/*
 * @Description: 点线面图层
 * @Date: 2022-03-29 14:10:16
 * @Author: yeming
 */

import OlSourceVector from 'ol/source/Vector' // 数据源，提供该layer下所有的图形信息。
import OlLayerVector from 'ol/layer/Vector' // 图层对象layer，最终的显示效果是由多个layer叠加而成。

// 定义飞机图层
const uavLayer = new OlLayerVector({ visible: true, zIndex: 2000 })
const uavSource = new OlSourceVector()
uavLayer.setSource(uavSource)

// 定义Point图层
const pointLayer = new OlLayerVector({ visible: true, zIndex: 1000 })
const pointSource = new OlSourceVector()
pointLayer.setSource(pointSource)

// 定义Line图层
const lineLayer = new OlLayerVector({ visible: true, zIndex: 998 })
const lineSource = new OlSourceVector()
lineLayer.setSource(lineSource)

// 定义Circle图层
const circleLayer = new OlLayerVector({ visible: true, zIndex: 999 })
const circleSource = new OlSourceVector()
circleLayer.setSource(circleSource)

// 定义Polygon图层
const polygonLayer = new OlLayerVector({ visible: true, zIndex: 998 })
const polygonSource = new OlSourceVector()
polygonLayer.setSource(polygonSource)

// 定义自定义Point图层
const customPointLayer = new OlLayerVector({ visible: true, zIndex: 1500 })
const customPointSource = new OlSourceVector()
customPointLayer.setSource(customPointSource)

// 定义禁飞区图层
const forbidLayer = new OlLayerVector({ visible: true, zIndex: 500 })
const forbidSource = new OlSourceVector()
forbidLayer.setSource(forbidSource)

// 定义电子围栏图层
const electricFenceLayer = new OlLayerVector({ visible: true, zIndex: 500 })
const electricFenceSource = new OlSourceVector()
electricFenceLayer.setSource(electricFenceSource)

// 定义仿真图层
const simulationLayer = new OlLayerVector({ visible: true, zIndex: 998 })
const simulationSource = new OlSourceVector()
simulationLayer.setSource(simulationSource)

// 定义空地协同图层
// const airGroundCooLayer = new OlLayerVector({ visible: true, zIndex: 998 })
// const airGroundCooSource = new OlSourceVector()
// airGroundCooLayer.setSource(airGroundCooSource)

const vectorLayers = []
vectorLayers.push(uavLayer, pointLayer, lineLayer, circleLayer, polygonLayer, customPointLayer, forbidLayer, electricFenceLayer, simulationLayer)

export {
  vectorLayers,
  uavLayer,
  pointLayer,
  lineLayer,
  circleLayer,
  polygonLayer,
  customPointLayer,
  forbidLayer,
  electricFenceLayer,
  simulationLayer
}

